import { request } from '@/utils/request'

// /api/mall/category/page
// 获取商城分类
export const getMallCategory = (params: object) => {
  return request({
    url: '/api/mall/category/page',
    method: 'GET',
    data: params
  })
}

// /api/mall/order/page
// 获取商城订单列表
export const getMallOrderList = (params: object) => {
  return request({
    url: '/api/mall/order/page',
    method: 'GET',
    data: params
  })
}
// /api/mall/order/detail
// 获取商城订单详情
export const getMallOrderDetail = (params: object) => {
  return request({
    url: '/api/mall/order/detail',
    method: 'GET',
    data: params
  })
}
// /api/mall/order/createOrder
// 创建商城订单
export const createMallOrder = (params: object) => {
  return request({
    url: '/api/mall/order/createOrder',
    method: 'POST',
    data: params
  })
}

// /api/mall/order/mallPayment
// 商城支付
export const mallPayment = (params: object) => {
  return request({
    url: '/api/mall/order/mallPayment',
    method: 'POST',
    data: params
  })
}

// /api/property/bill/page
// 获取缴费账单
export const getPaymentBill = (params: object) => {
  return request({
    url: '/api/property/bill/page',
    method: 'GET',
    data: params
  })
}
// /api/property/order/createOrder
// 创建物业订单
export const createPropertyOrder = (params: object) => {
  return request({
    url: '/api/property/order/createOrder',
    method: 'POST',
    data: params
  })
}
// /api/property/order/page
// 获取物业订单列表
export const getPropertyOrderList = (params: object) => {
  return request({
    url: '/api/property/order/page',
    method: 'GET',
    data: params
  })
}
// /api/property/order/detail
// 获取物业订单详情
export const getPropertyOrderDetail = (params: object) => {
  return request({
    url: '/api/property/order/detail',
    method: 'GET',
    data: params
  })
}
// /api/property/order/payment
// 物业支付
export const propertyPayment = (params: object) => {
  return request({
    url: '/api/property/order/payment',
    method: 'POST',
    data: params
  })
}
// /api/property/order/cancel
// 物业取消订单
export const propertyCancelOrder = (id: any) => {
  return request({
    url: '/api/property/order/cancel?id=' + id,
    method: 'POST'
  })
}
